﻿<!--
 Peter
 Created by: Peter Development Team
    http://peter.codeplex.com/
 
 GNU General Public License version 2 (GPLv2)
    http://peter.codeplex.com/license
 
 This code is provided on an AS IS basis, with no WARRANTIES,
  CONDITIONS or GUARANTEES of any kind.
-->
<UserControl x:Class="Peter.View.ViewConsoleOutput"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:icons="clr-namespace:Peter.Common.Icons;assembly=Peter.Common"
             xmlns:logic="clr-namespace:Peter.Logic"
             mc:Ignorable="d" 
             d:DesignHeight="200" d:DesignWidth="400"
             d:DataContext="{d:DesignInstance logic:ModelApplicationOutput}">
    <Grid>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <StackPanel Grid.Column="0">
            <ToggleButton IsChecked="{Binding Path=Editor.ShowLineNumbers, Mode=TwoWay}"
                       ToolTip="Show/Hide Line Numbers">
                <icons:IconDisplay Icon="Numberlist" />
            </ToggleButton>
            <ToggleButton IsChecked="{Binding Path=Editor.WordWrap, Mode=TwoWay}"
                       ToolTip="Wrap Text">
                <icons:IconDisplay Icon="AlignLeft" />
            </ToggleButton>
            <Button Command="{Binding Path=ClearCommand}"
                 ToolTip="Erase Output">
                <icons:IconDisplay Icon="Eraser" />
            </Button>
        </StackPanel>

        <ContentControl Grid.Column="1"
                        Content="{Binding Path=Editor}" />

        <!--<avalonedit:TextEditor x:Name="_TextEditor"
                             Focusable="True"
                             IsReadOnly="True"
                             Grid.Column="1"
                             ShowLineNumbers="True">
         <avalonedit:TextEditor.ContextMenu>
            <ContextMenu>
               <MenuItem Header="Copy"
                         Command="Copy">
                  <MenuItem.Icon>
                     <Icons:IconDisplay Icon="Copy"
                                        Margin="2" />
                  </MenuItem.Icon>
               </MenuItem>
               <MenuItem Header="Select All"
                         Command="SelectAll">
                  <MenuItem.Icon>
                     <Icons:IconDisplay Icon="SelectionRectangleSelection"
                                        Margin="2" />
                  </MenuItem.Icon>
               </MenuItem>

            </ContextMenu>
         </avalonedit:TextEditor.ContextMenu>
      </avalonedit:TextEditor>-->
    </Grid>
</UserControl>
